package test;

import helper.CleanHelper;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Vector;

import model.MotPondere;

import org.apache.log4j.Logger;
import org.semanticweb.owlapi.model.OWLClass;

import controller.OwlHandler;




public class maintest {
	private static Logger log = Logger.getLogger(maintest.class);
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
			
		OwlHandler oh = new OwlHandler(".\\ressources\\OntoBaladev2.owl");
		oh.init();
		//System.out.println(oh.getRelatedConcepts().size());
		System.out.println(oh.getRelatedInstances());		
		MotPondere t = new MotPondere("VOYAGE",0.33);	
		System.out.println(CleanHelper.formatLabel("VOYAGE"));
		System.out.println(CleanHelper.formatLabel("VOYAG"));
		System.out.println("------------------------------------------");
		System.out.println("------------------------------------------");
		Vector<MotPondere> test = oh.getSynonyme(t, true, true,true);
		Vector<MotPondere> v2 = new Vector<MotPondere>();
		v2.add(new MotPondere("ETANG_DE_BETHMAL"));
		System.out.println(test);
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		OWLClass lac = oh.getRelatedConcepts().get("LAC").get(0);
		System.out.println(oh.getInstances(lac));
		int i = oh.getProfondeur(oh.getRelatedConcepts().get("SKI").get(0));
		System.out.println(i);
		OWLClass ski = oh.getRelatedConcepts().get("SKI").get(0);
		OWLClass sport = oh.getRelatedConcepts().get("SPORT").get(0);
		OWLClass foret = oh.getRelatedConcepts().get("FORET").get(0);
		OWLClass grele = oh.getRelatedConcepts().get("GRELE").get(0);
		//OWLClass lac = oh.getRelatedInstances().get("LAC").get(0);
		OWLClass cccc = oh.getClasseParenteCommune(sport,lac);	
		System.out.println("------------****-----****");
		System.out.println(lac);
		System.out.println(sport);
		System.out.println(foret);
		System.out.println(grele);
		System.out.println(ski);
		double sim = oh.getSimEdge(sport,ski);
		System.out.println(sim);
		double sim2 = oh.getSimEdge(sport,grele);
		System.out.println(sim2);
		double sim3 = oh.getSimEdge(foret,lac);
		System.out.println(sim3);
		double sim4 = oh.getSimEdge(ski,lac);
		System.out.println(sim4);
		System.out.println("*********");
		sim = oh.getSimWu(sport,ski);
		System.out.println(sim);
		sim2 = oh.getSimWu(sport,grele);
		System.out.println(sim2);
		sim3 = oh.getSimWu(foret,lac);
		System.out.println(sim3);
		sim4 = oh.getSimWu(ski,lac);
		System.out.println(sim4);
		test = oh.getInstances(lac);
		System.out.println(test);
	}

}
